#include <SDL.h>
#include "menu.h"
#include "jeu.h"
#include "help.h"

int main ( int argc , char** argv )
{
    int done = 0;
    int Result,capt=0;
    SDL_Rect dstrect;    // initialize SDL video
    if ( SDL_Init( SDL_INIT_VIDEO ) < 0 )

    {
        printf( "Unable to init SDL: %s\n", SDL_GetError() );
        return 1;
    }

    // make sure SDL cleans up before exit

    // create a new window
    SDL_Surface* screen = SDL_SetVideoMode(978, 601, 32,
                                           SDL_HWSURFACE|SDL_DOUBLEBUF|SDL_FULLSCREEN);
    if ( !screen )
    {
        printf("Unable to set 640x480 video: %s\n", SDL_GetError());
        return 1;
    }


    Result=menu(screen);

    if(Result == 1) //start game
        jeu(screen);

    if(Result==0)
    {capt= help(screen);

    if (capt==1)
     Result=menu(screen);}
       // load an image


// draw bitmap

// DRAWING ENDS HERE

// finally, update the screen :)
    SDL_Flip(screen);
// end main loop

// free loaded bitmap

    return 0;

}


